package com.webchat.chat.dao;

import com.webchat.chat.core.Mapper;
import com.webchat.chat.core.enums.SocketRoomStatus;
import com.webchat.chat.model.SocketRoom;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SocketRoomMapper extends Mapper<SocketRoom> {

    /**
     * 查询房间信息
     * @param clientId
     * @param tenantCode
     * @param status
     * @return
     */
    List<SocketRoom> selectSocketRooms(@Param("clientId") String clientId, @Param("tenantCode") String tenantCode,
                                       @Param("status") SocketRoomStatus status);

    /**
     * 根据roomId查找房间
     * @param roomId
     * @return
     */
    SocketRoom selectSocketRoomByRoomId(@Param("roomId") String roomId);

    List<SocketRoom> getChatRoom(String tenantCode);
}